package cn.good.yan.t6.t2;

import jakarta.validation.constraints.*;

/**
 * 6 数据校验：Validation  - 验证 自定义效验
 *      2. 创建实体类
 *      自定义一个注解 @CannotBlank

 * @author shengren.yan
 * @create 2023-09-14
 */
public class User {

    @CannotBlank
    private String mas;

    @NotNull
    private String name;

    public String getMas() {
        return mas;
    }

    public void setMas(String mas) {
        this.mas = mas;
    }

    @Override
    public String toString() {
        return "User{" +
                "mas='" + mas + '\'' +
                ", name='" + name + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}
